package db;

/**
 * Customer.java represents data transer object Customer
 * 
 * @author XA9
 * 
 */

public class Customer {

	/** customer cpr */
	private int cpr;
	/** customer loginId */
	private int loginId;
	/** customer password */
	private int password;
	/** customer firstname */
	private String firstName;
	/** customer lastname */
	private String lastName;

	/**
	 * 
	 * Customer constructor initialize variable as this.variable
	 * 
	 * @param theLoginId
	 * @param thePassword
	 * @param theCpr
	 * @param theFirstName
	 * @param theLastName
	 * 
	 * 
	 * */
	public Customer(int theLoginId, int thePassword, int theCpr,
			String theFirstName, String theLastName) {
		loginId = theLoginId;
		firstName = theFirstName;
		lastName = theLastName;
		cpr = theCpr;
		password = thePassword;
	}

	/**
	 * determines whether a user-specified Password matches Password in Customer
	 * 
	 * @param userPassword
	 * @return true/false
	 */
	public boolean validatePassword(int userPassword) {
		if (userPassword == password)
			return true;
		else
			return false;
	}

	/**
	 * Returns String
	 * 
	 * @return firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * Returns String
	 * 
	 * @return lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * Returns integer
	 * 
	 * @return cpr
	 */
	public int getCpr() {
		return cpr;
	}

	/**
	 * Returns integer
	 * 
	 * @return loginId
	 */
	public int getLoginId() {
		return loginId;
	}

	/**
	 * Returns integer
	 * 
	 * @return password
	 */
	public int getPassword() {
		return password;
	}

}
